<?php if ( ! defined('BASEPATH')) exit('This file does not run directly. Sorry.'); ?>
<?php
/**
 * Kalaisoo.
 *
 * A lightweight no-framework framework written in PHP.
 *
 * @package Kalaisoo
 * @author $Author: info@sah-company.com $
 * @version $Id: welcome.php 126 2012-01-11 20:59:15Z info@sah-company.com $
 */

/**
 * Kalaisoo Welcome Controller Class.
 *
 * This is the default application controller of our framework. If you want to change the
 * default controller to something else, please edit file app/config/config.php. Once you
 * have finished your web application it is very likely that you want to change it and maybe
 * the default method as well. All that and more is at your hands in the config.php file.
 *
 * Please have a look at other controllers, e.g. User_Controller, to get an insight about
 * how to write a controller that is a manager between the model and the view.
 *
 * @package Kalaisoo
 * @subpackage Controller
 * @author $Author: info@sah-company.com $
 * @see app/config/config.php
 */
class Welcome_Controller extends Controller
{	
	/**
	 * construct a new Welcome_Controller and load language and textile helper.
	 */
	public function __construct()
	{
		parent::__construct();
		$this->registry->loader->language('welcome');
		$this->registry->loader->helper('textile');
		$this->template = new Template();
	}
	
	/**
	 * outputs the welcome template.
	 *
	 * @param string A persons name. Used to demonstrate dynamic aspects
	 */
	public function index($name = 'welcome_guest')
	{
		$this->template->view('welcome', array('name' => __($name)));
	}
}
?>